import type { RouteRecordRaw } from 'vue-router';


import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'mdi:bug',
      title: $t('demos.test'),
    },
    name: 'Test',
    path: '/test',
    redirect: '/test/test1/index',
    children: [
      {
        name: 'Test1Index',
        path: '/test/test1/index',
        component: () => import('#/views/test/test1/index.vue'),
        meta: {
          icon: 'mdi:bug',
          title: $t('demos.test1'),
        },
      },
        {
        name: 'Test2Index',
        path: '/test/test2/index',
        component: () => import('#/views/test/test2/index.vue'),
        meta: {
          icon: 'mdi:bug',
          title: $t('demos.test2'),
          authority: ['admin', 'super'],  
        }
      },
       {
        name: 'Websocket',
        path: '/test/websocket/index',
        component: () => import('#/views/test/websocket/index.vue'),
        meta: {
          icon: 'mdi:bug',
          title: $t('demos.websocket'),
          authority: ['admin', 'super'],  
        }
      },
        {
        name: 'Jimu',
        path: '/test/jimu/index',
        meta: {
          icon: 'mdi:bug',
          title: $t('demos.jimu'),
          authority: ['admin', 'super'],  
          iframeSrc:'http://shenluwei.cn:8088/jmreport/list' //必须使用http，不然由于积木报表是单独的，会访问不到
        }
      },
       {
        name: 'Baidu',
        path: '/test/baidu/index',
        component: () => import('#/views/test/baidu/index.vue'),
        meta: {
          icon: 'mdi:bug',
          title: $t('demos.baiduMap'),
          authority: ['admin', 'super'],  
        }
      }
      
    ],
  },
];

export default routes;
